#define MAX_NAMELENGTH 256

typedef struct file{
 char path[MAX_PATH];
 char name[MAX_NAMELENGTH];
 struct file *next;
}file;

void addToList(file* f,file* l){
	
file *F;
F=l;

while(F->next!=NULL){
F=F->next;

}
F->next=f;
F=F->next;

F->next=NULL;
	
	}
	
bool findDump(file* f,file *list){
file *F;
F=list;
bool tag=false;

while(F->next!=NULL){
F=F->next;
if(lstrcmp(f->name,F->name)==0 && lstrcmp(f->path,F->path)==0){
tag=true;
break;
}
}
return tag;
}

file * find(int index,file *list){
	file *f;
	f=list->next;
	while(index--){
	f=f->next;
	}
	return f;


}

file* deleteFromList(int index,file *list){

file *f=list;
while(index--){
f=f->next;
}
file *temp=f->next;
f->next=temp->next;
free(temp);
temp->next=NULL;
return f;


}
